<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
        "http://www.w3.org/TR/1999/REC-html401-19991224/frameset.dtd">
<%@ page
  import="java.util.Vector,java.util.HashMap,
  com.epro.standard.frontend.util.FileInfoUtil,
  com.softplus.carrefour.hd.bltier.entity.UserLevel,
  com.softplus.carrefour.hd.bltier.admin.UserLevelManage,
  com.softplus.carrefour.hd.CFHDSystem,
  com.epro.standard.frontend.util.FileInfoUtil,
  org.displaytag.tags.TableTag"
%>
<html xmlns:epro>
<%@ taglib uri="/WEB-INF/HeadTag.tld" prefix="head" %>
<%@ taglib uri="/WEB-INF/ToolbarTag.tld" prefix="toolbar" %>
<%@ taglib uri="/WEB-INF/TextfieldTag.tld" prefix="textfield" %>
<%@ taglib uri="/WEB-INF/ListboxTag.tld" prefix="listbox" %>
<%@ taglib uri="/WEB-INF/TextareaTag.tld" prefix="textarea" %>
<%@ taglib uri="/WEB-INF/displaytag-12.tld" prefix="display" %>
<head:Head
	author="Pomme"
	import="textfield,listbox,textarea,toolbar,masterTable"
	styleFile="../theme/defaultTheme.css,../theme/CFRLTheme.css"
	jsFile="../script/spTitleRefresh.js,../script/checkValidData.js,../script/Alert.js,../script/dateCalendar.js,../script/convertDataType.js"
	title="User Level">
</head:Head>
<%-- @ include file="../include/eproFileInfo.jsp" --%>
<%
  System.out.println("==================== BEGIN JSP CFHDADMD01=================");
  com.epro.standard.frontend.util.EproServletUtil servletUtil = new com.epro.standard.frontend.util.EproServletUtil(request) ;

  FileInfoUtil	fileInfoUtil = (session.getAttribute("fileInfoUtil")!=null?(FileInfoUtil) session.getAttribute("fileInfoUtil"):new FileInfoUtil());
  fileInfoUtil.setMenuIDCode("CFHDADMD01 ") ;
  fileInfoUtil.setMenuName("Level Setup") ;
  fileInfoUtil.setMenuDesc("To assign user(s) to each user level") ;
  fileInfoUtil.setMasterWording("User Level") ;

  HashMap ulevelMap = UserLevel.uLevel;

  //list box  User Level
  String	listboxData[] = {"Select", UserLevel.ADMIN,
                                UserLevel.ADMIN_COUNTRY,
                                UserLevel.LEVEL_1_COUNTRY_HELPDESK,
                                UserLevel.LEVEL_2_COUNTRY_APPLICATION_TEAM_BACK_OFFICE,
                                UserLevel.LEVEL_2_AMS_ZONE_ASIA,
                                UserLevel.LEVEL_3_AMS_BANGKOK,
                                UserLevel.LEVEL_3_ZONE_DATA_CENTER,
                                UserLevel.PRODUCTION_STAFF};
  //Modified by Siritas S.,use class's field values instead of static text.
  String	listboxLabel[]= {"Select User Level",
                                ulevelMap.get(UserLevel.ADMIN).toString(),
                                ulevelMap.get(UserLevel.ADMIN_COUNTRY).toString(),
                                ulevelMap.get(UserLevel.LEVEL_1_COUNTRY_HELPDESK).toString(),
                                ulevelMap.get(UserLevel.LEVEL_2_COUNTRY_APPLICATION_TEAM_BACK_OFFICE).toString(),
                                ulevelMap.get(UserLevel.LEVEL_2_AMS_ZONE_ASIA).toString(),
                                ulevelMap.get(UserLevel.LEVEL_3_AMS_BANGKOK).toString(),
                                ulevelMap.get(UserLevel.LEVEL_3_ZONE_DATA_CENTER).toString(),
                                ulevelMap.get(UserLevel.PRODUCTION_STAFF).toString()};

  int listboxSelect = 1;

  // variable for master table need	*********
	String   masterWidth  = "750";
	String   masterHeight = "300";
%>
    <body>
      <table align="center" cellpadding="0" cellspacing="0" border="0" width="100%">
        <tr>
          <td align="center" valign="top" class="titleFont">
           <%=fileInfoUtil.MasterHeadTable()%>
           <form name="frm" style="margin:0px; text-align:center;"><span class="titleFont">User Level :</span>
            <listbox:listbox
              name="userLevel" data="<%=listboxData%>" label="<%= listboxLabel%>" selectedIndex="<%= listboxSelect%>"  width="345" onchange="levelSelected()">
            </listbox:listbox>
            </form>
           <%= fileInfoUtil.MasterFootTable() %>
          </td>
        </tr>
        <tr>
          <td height="390" align="center">
        <iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" name="frmManage" id="frmManage" src="CFHDADMT01.jsp" width="100%" height="100%"></iframe>
        </td>
        </tr>
        </table>
    <script type="text/javascript">
         function levelSelected()
         {
           document.all.frmManage.src="CFHDADMT01.jsp?level=" + frm.userLevel.value;
         }
  </script>
  </body>
  </html>